﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="testNews1.aspx.cs" Inherits="test1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h1>salam</h1>
    </div>
    <asp:DataList ID="DataList1" runat="server" DataKeyField="ID" 
        DataSourceID="SqlDataSource1" BackColor="#FF0066" BorderColor="#00CC00" 
        ForeColor="#3366FF" GridLines="Horizontal">
        <AlternatingItemStyle BackColor="#FFFF99" BorderColor="Red" 
            BorderStyle="Dotted" />
        <EditItemStyle BackColor="#6699FF" />
        <ItemStyle BackColor="Lime" />
        <ItemTemplate>
        <table>
            <tr>
                <td>
                    ID:
                    <asp:Label ID="IDLabel" runat="server" Text='' />
                    <br />
                    Title:
                    <a href="Details?ID=<%# Eval("ID") %>" ><%# Eval("Title") %></a>
                    <br />
                    Abstract:
                    <asp:Label ID="AbstractLabel" runat="server" Text='<%# Eval("Abstract") %>' />
                    <br />
                    Detail:
                    <asp:Label ID="DetailLabel" runat="server" Text='<%# Eval("Detail") %>' />
                    <br />
                </td>
                <td>                    
                    <a href="Details?ID=<%# Eval("ID") %>" >
                        <img src= "<%# Eval("Image") %>" />
                    </a>
                    <br />
                </td>
            </tr>
        </table>
<br />
        </ItemTemplate>
        <SelectedItemStyle BackColor="#99CCFF" />
    </asp:DataList>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:simbafConnectionString %>" 
        SelectCommand="SELECT * FROM [NEWS]"></asp:SqlDataSource>
    </form>
</body>
</html>
